
public class Elevator extends Entity implements Collidable
{
	int originY;
	public Elevator(Game game, int x, int y, SpriteImage sprite)
	{
		super(game, x, y, sprite);
		originY = y;
	}
	
	@Override
	public void update(long gameTime) 
	{
		if (collidesTop(game.player))
		{
			y = y - 3;
		}
		else
		{
			if (y < originY)
			{
				y = y + 3;
			}
		}
		
	}

}
